04bea33a04dd2de07d9e2e0088b6d0e2205dc60c,plugins/git4idea/src/git4idea/config/GitOptionsTopHitProvider.java,GitOptionsTopHitProvider,getOptions,#Project#,42
Before Change
option(project, "Git: Commit automatically on cherry-pick", "isAutoCommitOnCherryPick", "setAutoCommitOnCherryPick"),
option(project, "Git: Auto-update if push of the current branch was rejected", "autoUpdateIfPushRejected", "setAutoUpdateIfPushRejected"),
option(project, "Git: Warn if CRLF line separators are about to be committed", "warnAboutCrlf", "setWarnAboutCrlf"),
option(project, "Git: Warn when committing in detached HEAD or during rebase", "warnAboutDetachedHead", "setWarnAboutDetachedHead")));
}
}
}
After Change
options.add(option(project, "Git: Auto-update if push of the current branch was rejected", "autoUpdateIfPushRejected", "setAutoUpdateIfPushRejected"));
GitRepositoryManager manager = ServiceManager.getService(project, GitRepositoryManager.class);
if (manager != null && manager.moreThanOneRoot()) {
options.add(new BooleanOptionDescription("Git: Control repositories synchronously", "vcs.Git") {
@Override
public boolean isOptionEnabled() {
return settings.getSyncSetting() == DvcsSyncSettings.Value.SYNC;
}
@Override
public void setOptionState(boolean enabled) {
settings.setSyncSetting(enabled ? DvcsSyncSettings.Value.SYNC : DvcsSyncSettings.Value.DONT_SYNC);
}
});
}
options.add(option(project, "Git: Warn if CRLF line separators are about to be committed", "warnAboutCrlf", "setWarnAboutCrlf"));
options.add(option(project, "Git: Warn when committing in detached HEAD or during rebase", "warnAboutDetachedHead", "setWarnAboutDetachedHead"));
options.add(option(project, "Git: Allow force push", "isForcePushAllowed", "setForcePushAllowed"));
return Collections.unmodifiableCollection(options);
}